package bpm.dao.impl.foreignactive;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import bpm.dao.foreignactive.ForeignActiveRecordDao;
import bpm.domain.foreignactive.ForeignActiveRecord;


@Repository("foreignActiveRecordDao")
public class ForeignActiveRecordDaoImpl implements ForeignActiveRecordDao{
	
	@Resource
	private JdbcTemplate jdbcTemplate;
	
	public void addForeignActiveRecord(String sql, Object...obj) {
		this.jdbcTemplate.update(sql, obj);
		
	}
	

	@SuppressWarnings("unchecked")
	public List<ForeignActiveRecord> findForeignActiveRecordList(String sql) {
		
		
		return this.jdbcTemplate.query(sql,new ForeignActiveRecordRowMapper());
		
		
		
	}


	public void deleteForeignActiveRecord(String sql) {
		this.jdbcTemplate.update(sql);
		
	}

}
